package com.ruoyi.yljf.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.yljf.mapper.ArticleTableMapper;
import com.ruoyi.yljf.domain.ArticleTable;
import com.ruoyi.yljf.service.IArticleTableService;

/**
 * 文章标签中间表Service业务层处理
 * 
 * @author metaee
 * @date 2025-03-10
 */
@Service
public class ArticleTableServiceImpl extends ServiceImpl<ArticleTableMapper, ArticleTable> implements IArticleTableService {
    @Autowired
    private ArticleTableMapper articleTableMapper;
    
    /**
     * 查询文章标签中间表列表
     * 
     * @param articleTable 文章标签中间表
     * @return 文章标签中间表
     */
    @Override
    public List<ArticleTable> selectArticleTableList(ArticleTable articleTable) {
    	LambdaQueryWrapper<ArticleTable> queryWrapper = Wrappers.lambdaQuery();
        if (StringUtils.isNotNull(articleTable.getTableId())) {
			queryWrapper.eq(ArticleTable::getTableId, articleTable.getTableId());
		}
        if (StringUtils.isNotNull(articleTable.getArticleId())) {
			queryWrapper.eq(ArticleTable::getArticleId, articleTable.getArticleId());
		}
        return articleTableMapper.selectList(queryWrapper);
    }
}
